import java.util.Scanner;

//测试类
public class RentMgr {
	@SuppressWarnings("resource")
	public static void main(String[] args) {
		//用户录入需要租赁的车的类型
		Scanner scanner = new Scanner(System.in);
		MotoOperation motoMgr = new MotoOperation();
		motoMgr.init();
		String brand;
		String model = null;
		int seat=0;
		System.out.println("********欢迎光临汽车租赁公司！********");
		System.out.println("1.轿车\t2.客车");
		int choice=scanner.nextInt();
		if(choice==1) {
			System.out.println("您选择了租赁轿车！");
			System.out.println("请选择您要租赁的轿车品牌：\n1.宝马\t2.别克");
			brand=scanner.nextInt()==1?"宝马":"别克";
			if(brand.equals("宝马")) {
				System.out.println("请选择"+brand+"的型号：\n1.x6\t2.550i");
				model=scanner.nextInt()==1?"x6":"550i";
			}else {
				System.out.println("请选择"+brand+"的型号：\n1.林荫大道\t2.GL8");
				model=scanner.nextInt()==1?"林荫大道":"GL8";
			}
		}else {
			System.out.println("您选择了租赁客车！");
			System.out.println("请选择您要租赁的客车品牌：\n1.金杯\t2.金龙");
			brand=scanner.nextInt()==1?"金杯":"金龙";
			if(brand.equals("金杯")) {
				System.out.println("请选择"+brand+"的座位数：\n1.16\t2.34");
				seat=scanner.nextInt()==1?16:34;
			}else {
				System.out.println("请选择"+brand+"的的座位数：\n1.16\t2.34");
				seat=scanner.nextInt()==1?16:34;
			}
			
		}
		//根据用户输入返回用户需要的汽车类型
		Vehicle vehicle=motoMgr.motoLentRent(brand, model, seat);
		
		System.out.print("请输入您要租车的天数：");
		int days=scanner.nextInt();
		double rent=vehicle.calcRent(days);
		System.out.println("您的租车费用为："+rent);
		System.out.println("恭喜您租车成功！");
		System.out.println(vehicle.toString());
		
		
	}
}
